#include <iostream>
using namespace std;

const int N = 30;
int data[N+5];
int ans;

void f(int prev,int curr){
  if(curr >= N){
    ans++;
    return;
  }

  // 上一个是开的时候
  if(prev == 1){
    f(0,curr+1);
  }else{
    f(0,curr+1);
    f(1,curr+1);
  }
}

int main(){
  f(0,0);
  cout << ans << endl;
  return 0;
}
